<!-- saved from url=(0026)/test.html -->
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>骡窝窝问答,解决旅行问题,基于旅游的问答分享平台 - 骡窝窝</title>
    <meta name="viewport"
          content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui,viewport-fit=cover">
    <meta name="format-detection" content="telephone=no,address=no">

    <link href="/css/mobile+css+head_mobile+css+ui%5EYVw%5E1526627473.css" rel="stylesheet" type="text/css">

    <link href="/css/new_ask2016.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="/css/userTravels.css"/>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <script src="/js/plugins/jquery/jquery.min.js"></script>
    <script src="/js/plugins/form/jquery.form.js"></script>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css"/>
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script type="text/javascript" async="" charset="utf-8" src="./question_files/core.php"></script>
    <script type="text/javascript" async="" charset="utf-8" src="./question_files/c.php"></script>
    <script type="text/javascript" async="" charset="utf-8" src="./question_files/core(1).php"></script>
    <script type="text/javascript" async="" charset="utf-8" src="./question_files/core(2).php"></script>
    <script type="text/javascript" async="" charset="utf-8" src="./question_files/c(1).php"></script>
    <script type="text/javascript">

    </script>
    <link href="./question_files/mobile+css+1526627473.css" rel="stylesheet" type="text/css">


    <link href="./question_files/new_ask2016.css" rel="stylesheet" type="text/css">

    <script async="" src="./question_files/mobile+js+wenda.下载" crossorigin="anonymous"></script>
    <link href="./question_files/mobile+css+1535539097.css" rel="stylesheet" type="text/css">

    <link href="./question_files/mobile+css+1537351708question.css" rel="stylesheet" type="text/css">

    <script language="javascript"
            src="./question_files/mobile+js+jquery-2.1.4_mobile+js+jquery.mobile-events_mobile+mfwappsdk^Yl1U^1.下载"
            type="text/javascript" crossorigin="anonymous"></script>

    <script async="" src="./question_files/mobile+js+Pop_mobile+1538043348.js.下载" crossorigin="anonymous"></script>
    <link rel="stylesheet" href="/js/plugins/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/plugins/jquery/jquery.min.js"></script>
    <script src="/js/plugins/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/news.css"/>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css"/>
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script src="/js/common.js"></script>
    <style type="text/css">
        .head2home {
            background: #4D4C4B;
            color: white;
            font-size: 18px;
            text-align: center;
        }
    </style>

    <script>
        $(function () {
            //获取当前页的input框
            var currentInput = $('#currentPage');
            //存放数据的新数组
            var questionarr = [];
            //总页数
            var pages = 1;

            function query() {
                //获取当前页的值
                var currentPage = currentInput.val()
                $.get('/questions', {currentPage:currentPage},function (data) {
                    //合并两个数组到第一个数组
                    $.merge(questionarr, data.list);
                    var json = {list: questionarr};
                    console.log(json);
                    $('.a-list').renderValues(json, {
                        'getAddress': function (item, value) {
                            var add = $(item).data('href');
                            $(item).attr('href', add + value);
                        }
                    });
                    //获取总页数
                    pages = data.pages;
                });
                //当前input框的值加1
                currentInput.val(parseInt(currentPage) + 1);
            }

            //默认查询第一页的数据
            query();
            //获取更多评论函数
            $('._j_add_more_button').click(function () {
                if ($(document).scrollTop() + $(window).height() >= $(document).height()) {
                    //获取下一页
                    var currentPage = currentInput.val();
                    if (currentPage <= pages) {
                        query();
                    } else {
                        $(document).dialog({
                            type: 'notice',
                            infoText: '没有了哦,看别的吧',
                            autoClose: 1500,
                            position: 'center'
                        });
                    }
                }


            });

        });
    </script>

</head>
<body>
<div id="pos38"></div>

<header class="head2home ">
    <div class="row ">
        <div class="col" style="text-align: left;margin: 0px 7px;">
            <a href="javascript:history.go(-1);">
                <span><i class="fa fa-chevron-left"style="line-height: 50px"></i></span>
            </a>
        </div>
        <div class="col" >
            <span style="line-height: 50px;">骡窝窝问答</span>
        </div>
        <div class="col"></div>
    </div>
</header>
<!--当前页的隐藏输入框-->
<input name="currentPage" id="currentPage" type="hidden" value="1">
<section class="ans-list a-list">
    <ul class="_j_pager_box" render-loop="list">
        <li>
            <a data-href="/answer.html?questionId=" render-key="list.id" render-fun="getAddress">
                <h2 render-html="list.title"></h2>
                <div class="clearfix">
                    <div class="user-img clearfix" data-uid="46376914">
                        <p>
                            <img render-src="list.user.headImgUrl">
                        </p>
                        <span render-html="list.user.nickName"></span>
                    </div>
                    <div class="ans-nr">
                        <div class="clearfix">
                            <p render-html="list.content"></p>
                        </div>
                        <div class="clearfix">
                            <span class="fl-l" render-html="list.user.place"></span>

                            <span class="fl-r"><b render-html="list.answerCount"></b>回答</span>
                        </div>
                    </div>
                </div>
            </a>
        </li>
    </ul>
    <div style="margin-bottom: 65px;">
        <a class="more-list _j_add_more_button" style="font-size: 15px">更多问题</a>
    </div>
</section>

<section class="askfoot">
    <a href="/mine/ask.html" class="btn-que" style="font-size: 15px;"><i></i>
        我要提问
    </a>
</section>
</body>
</html>